<?php
//财务统计
session_start();
require('../conn.php');
require('../functions.php');
require('admin.php');
$page = $_GET['page'];
if (is_numeric($page) == false) {
	$page = 1;
} else {
	$page = $page + 1;
}
?>
<?php include('head.php') ?>
<div class="container-fluid">
	<div class="row-fluid">
		<?php
		include('left.php'); ?>
		<div class="span10">
			<h1 class="page-title">已经提现</h1>
			<div class="well">
				<div id="myTabContent" class="tab-content">
					<div class="tab-pane active in" id="home">
						<div class="well">
							<div class="pull-right">
								<button class="btn"><a href="txlist1.php">首页</a></button>
								<button class="btn"><a href="?page=<?php echo $page ?>">下一页</a></button>
							</div>
							<table class="table">
								<thead>
								<tr>
									<th>#</th>
									<th>金额</th>
									<th>提现次数</th>
									<th>日期</th>
								</tr>
								</thead>
								<tbody>
								<?php
								$row = $mysql->query("select payday,sum(money) as money,COUNT(*) as total from txdata where state = 2 GROUP BY payday order by `payday` desc");
								$txinfo = page_array(50, $page, $row, 0);
								$i=1;
								foreach ($txinfo as $tx) {
									print <<<table
        <tr>
		  <td>{$i}</td>
		  <td>{$tx['money']}</td>
		  <td>{$tx['total']}</td>
		  <td>{$tx['payday']}</td>
        </tr>
table;
									$i++;
								} ?>
								</tbody>
							</table>
						</div>
					</div>
					<div class="tab-pane fade" id="profile">
					</div>
				</div>

			</div>

		</div>
	</div>
</div>

<footer>
	<hr>

	<p class="pull-right"><!--power by right--></p>


	<p><!--power by --></p>
</footer>
<script src="lib/bootstrap/js/bootstrap.js"></script>


</body>
</html>